package com.yx.yinshanjinniu.activitys;

import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.yx.yinshanjinniu.R;
import com.yx.yinshanjinniu.base.BaseActivity;
import com.yx.yinshanjinniu.bean.CalendarDetail;
import com.yx.yinshanjinniu.utils.RouteUtil;


public class CalendarDetailActivity extends BaseActivity {

    private TextView tv_detail_title;
    private TextView tv_organization;
    private TextView tv_times;
    private TextView tv_way;
    private TextView tv_date;
    private TextView tv_describe;
    private TextView tv_explain;

    private CalendarDetail bean;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        bean = (CalendarDetail) getIntent().getSerializableExtra(RouteUtil.BUNDLE_CALENDAR_MODEL);
        initDate();
    }

    private void initDate() {
        tv_detail_title.setText(bean.title);
        tv_organization.setText(bean.institutions);
        tv_times.setText(bean.frequency);
        tv_way.setText(bean.method);
        tv_date.setText(bean.impact);
        tv_describe.setText(bean.paraphrase);
        tv_explain.setText(bean.focus);
    }

    @Override
    protected int setContentView() {
        return R.layout.activity_calendar_detail;
    }

    /**
     * 加载控件
     */
    @Override
    protected void findViews() {
        tv_detail_title = findViewById(R.id.tv_detail_title);
        tv_organization = findViewById(R.id.tv_organization);
        tv_times = findViewById(R.id.tv_times);
        tv_way = findViewById(R.id.tv_way);
        tv_date = findViewById(R.id.tv_date);
        tv_describe = findViewById(R.id.tv_describe);
        tv_explain = findViewById(R.id.tv_explain);
    }

    @Override
    protected void setListeners() {

    }
}
